<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>头部信息</title>
	<style type="text/css">
	#header{
		background-color: #393d49;
		text-align: center;
		height: 80px;
	}
	#header a{
		color: #f0f0f0;
		text-decoration: none;
	}
	#headerleft{
		float: left;
		height: 80px;
		margin-left: 50px;
	}
	#headerright{
		float: right;
		height: 80px;
		text-align: center;
		line-height: 80px;
		margin-right: 30px;
	}
	#headerspan{
		padding: 10px;
	}
	</style>
</head>
<body>
<div id="header">
	<div id="headerleft">
		<a href="index.php"><h1>机房留言本系统V1.0</h1></a>
	</div>
	<div id="headerright">
		<?php
		if(isset($_COOKIE["username"])&&$_COOKIE["username"]!=NULL){
		$username=$_COOKIE["username"];
		echo "<span id=\"headerspan\"><a href=\"fabuliuyan.php\" style=\"color: red;\">我要留言</a></span>";
		echo "<span id=\"headerspan\"><a>欢迎".$username."</a></span><span id=\"headerspan\"><a href=\"logout.php?action=logout\">点击退出登录</a></span>";
		}else{
		echo "<span id=\"headerspan\"><a href=\"login.php\">登录</a>
			</span>
			<span id=\"headerspan\"><a href=\"register.php\">注册</a>
			</span>";
		}
		?>
	</div>
</div>
</body>
</html>